﻿namespace FlexConta.DataAccess.DataModel
{
    using FlexPlatform.BusinessLogic.DataModel;

    public class Adresa : DbEntityBase
    {
        #region Private fields
        // direct value
        private string clsStrada;
        private string clsNumar;
        private string clsDetalii;
        // object references
        private Localitate clsJudet;
        private Localitate clsLocalitate;
        #endregion

        #region Direct-value properties
        /// <summary>
        /// Gets or sets the value for 'Strada'
        /// </summary>
        public string Strada
        {
            get
            {
                return clsStrada;
            }
            set
            {
                TryUpdateProperty(this, a => a.Strada, value, ref clsStrada);
            }
        }

        /// <summary>
        /// Gets or sets the value for 'Numar'
        /// </summary>
        public string Numar
        {
            get
            {
                return clsNumar;
            }
            set
            {
                TryUpdateProperty(this, a => a.Numar, value, ref clsNumar);
            }
        }

        /// <summary>
        /// Gets or sets the value for 'Detalii'
        /// </summary>
        public string Detalii
        {
            get
            {
                return clsDetalii;
            }
            set
            {
                TryUpdateProperty(this, a => a.Detalii, value, ref clsDetalii);
            }
        }

        #endregion

        #region Indirect properties

        /// <summary>
        /// Gets or sets the reference for 'Judet'
        /// </summary>
        public Localitate Judet
        {
            get
            {
                return clsJudet;
            }
            set
            {
                TryUpdateProperty(this, a => a.Judet, value, ref clsJudet);
            }
        }

        /// <summary>
        /// Gets or sets the reference for 'Localitate'
        /// </summary>
        public Localitate Localitate
        {
            get
            {
                return clsLocalitate;
            }
            set
            {
                TryUpdateProperty(this, a => a.Localitate, value, ref clsLocalitate);
            }
        }
        #endregion
    }
}
